package com.campus.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.campus.entity.User;
import com.campus.entity.Users;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Mapper
public interface UsersMapper extends BaseMapper<Users> {
    /**
     * 根据邮箱查询该用户是否存在
     * @return
     */
    Users getUser(String email);
    int insertUser(User user);
    List<Users> selectAll();

    Users getUserByUsername(String username);

    Users getByEmail(String email);

    int updatePassword(@Param("email") String email,@Param("password") String password);

    Users getUserByID(String userID);
}